<form action="" method="POST">
    {{# csrf_token }}
        {{> csrf_token_input }}
    {{/ csrf_token }}
    <div id="edit-description-field-modal-{{ id }}"
        class="tlp-modal"
        role="dialog"
        aria-labelledby="edit-description-field-modal-label-{{ id }}"
    >
        <div class="tlp-modal-header">
            <h1 class="tlp-modal-title" id="edit-description-field-modal-label-{{ id }}">
                <i class="fa fa-pencil tlp-modal-title-icon"></i> {{ edit_modal_title }}
            </h1>
            <div class="tlp-modal-close" data-dismiss="modal" aria-label="Close">
                &times;
            </div>
        </div>
        <div class="tlp-modal-body">
            <div class="modal-description-field-modal-row">
                <input type="hidden" name="update_desc" value="1">
                <input type="hidden" name="form_desc_id" value="{{ id }}">

                <div class="tlp-form-element">
                    <label class="tlp-label" for="edit-field-form-name-{{ id }}">{{ modal_field_form_name_label }} <i class="fa fa-asterisk"></i></label>
                    <input type="text"
                        id="edit-field-form-name-{{ id }}"
                        class="tlp-input"
                        name="form_name"
                        size="30"
                        placeholder="{{ modal_field_form_name_placeholder }}"
                        value="{{ name }}"
                        required
                    >
                </div>
                <div class="tlp-form-element">
                    <label class="tlp-label" for="edit-field-form-type-{{ id }}">{{ modal_field_form_type_label }} <i class="fa fa-asterisk"></i></label>
                    <select class="tlp-select tlp-select-adjusted" id="edit-field-form-type-{{ id }}" name="form_type">
                        <option value="line" {{# type_is_line}}selected{{/ type_is_line }}>{{ modal_field_form_type_label_line }}</option>
                        <option value="text" {{^ type_is_line}}selected{{/ type_is_line }}>{{ modal_field_form_type_label_text }}</option>
                    </select>
                </div>
                <div class="tlp-form-element">
                    <label class="tlp-label" for="edit-field-form-rank-{{ id }}">{{ modal_field_form_rank_label }} <i class="fa fa-asterisk"></i></label>
                    <input type="text"
                        class="tlp-input"
                        id="edit-field-form-rank-{{ id }}"
                        name="form_rank"
                        size="4"
                        placeholder="12"
                        value="{{ rank_on_screen }}"
                        required
                    >
                </div>
            </div>
            <div class="tlp-form-element">
                <label class="tlp-label" for="edit-field-form-description-{{ id }}">{{ modal_field_form_description_label }}  <i class="fa fa-asterisk"></i></label>
                <textarea type="text"
                    id="edit-field-form-description-{{ id }}"
                    class="tlp-textarea"
                    name="form_desc"
                    placeholder="{{ modal_field_form_description_placeholder }}"
                    rows="4"
                    required>{{{ purified_description }}}</textarea>
                <p class="tlp-text-info">{{ modal_field_form_description_info }}</p>
            </div>
            <div class="tlp-form-element">
                <label class="tlp-label tlp-checkbox">
                    <input type="checkbox" name="form_required" value="1" {{# required_value }}checked{{/ required_value }}> {{ modal_field_form_required_label }}
                </label>
            </div>
        </div>
        <div class="tlp-modal-footer">
            <button type="button" class="tlp-button-primary tlp-button-outline tlp-modal-action" data-dismiss="modal">{{ edit_modal_cancel }}</button>
            <button type="submit" class="tlp-button-primary tlp-modal-action">
                <i class="fa fa-save tlp-button-icon"></i> {{ edit_modal_submit }}
            </button>
        </div>
    </div>
</form>
